//
//  MonitorRealTableViewCell2.m
//  CityFire
//
//  Created by liuyangzhu on 2017/8/19.
//  Copyright © 2017年 刘养柱. All rights reserved.
//

#import "MonitorRealTableViewCell2.h"

@interface MonitorRealTableViewCell2 ()

@property (weak, nonatomic) IBOutlet UILabel *deviceNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *deviceNoLabel;
@property (weak, nonatomic) IBOutlet UILabel *statusLabel;
@property (weak, nonatomic) IBOutlet UILabel *sourceLabel;
@property (weak, nonatomic) IBOutlet UILabel *contentLabel;
@property (weak, nonatomic) IBOutlet UILabel *deviceTypeLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *remarkLabel;
@property (weak, nonatomic) IBOutlet UILabel *resultLabel;

@end

@implementation MonitorRealTableViewCell2

- (void)setMonitorModel:(MonitorModel *)monitorModel
{
    self.deviceNameLabel.text = monitorModel.deviceName;
    self.deviceNoLabel.text = [NSString stringWithFormat:@"设备编号:%ld", monitorModel.deviceCode];
    //    [UIColor colorWithRed: / 255.0 green:/ 255.0 blue: / 255.0 alpha:1.0f]
    self.statusLabel.text = monitorModel.misinformation;
    self.statusLabel.textColor = [monitorModel.misinformation containsString:@"否"] ? [UIColor orangeColor] : [UIColor greenColor];
    self.sourceLabel.text = monitorModel.record1;
    self.contentLabel.text = monitorModel.record3;
    self.deviceTypeLabel.text = monitorModel.record2;
    NSString *str = [NSString stringWithFormat:@"%ld",monitorModel.timeHistory];
    NSString *breaktime = [NSString timeWithTimeIntervalString:str];
    self.timeLabel.text = breaktime;
    self.resultLabel.text = monitorModel.recordUsrLog;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
